﻿using System;
using System.Configuration;

namespace FBGraph.Configuration
{
    /// <summary>Allows developers to programmatically access the various sections in the FBGraph configuration.</summary>
    public class FBGraphSectionGroup : ConfigurationSectionGroup
    {
        /// <summary>Contains configuration elements specific to the FBGraph API.</summary>
        public FBGraphApiSection Api
        {
            get
            {
                var apiSection = ConfigurationManager.GetSection("fbgraph/api");
                if (apiSection != null) return (FBGraphApiSection)apiSection;
                else return null;
            }
        }
    }
}